GET FILE = "Mar_09_AMP_IAT_summary.sav" .
*This selects subjects prior to 8am on election day.
SELECT IF (subject < 1065850) .
EXECUTE .

*Variables:
*    subject SESSION_ID iatcond qtryhard qpushfast attrace qdeserve 
*    Twhite qslavery Tblack forcechoice_McCain raceinfluence whovotechoose Tmccain Tobama
*    attpol race_th_dif USER_ID sex age orgn race @_NAME amp amp1 amp2 namp mamp 
*    voteObama cand_th_dif politicalID conservatism 
*    VoteMcCain white mixed black citizen scaled_vote birthmonth birthyear citizenship class education engfluency 
*    ethnicity income occupation religion religionid residence zipcode ethnicityomb genoccupation major raceomb 
*    reldenom relfamily dayofbirth 
*    symb_racism order position 
*    D_biep_x D_biep_a D_biep_b Nx Na Nb D_biep D_biep_all 
*    errorx errora errorb pct_300 pct_400 pct_2K pct_5K pct_10K
*    aveltncy error_pct ntrials IAT_filter$ 
*    VoteMcCain white mixed black 
*    race_IAT_d race_IATall_d race_IATx_d race_IATa_d race_IATb_d race_amp_d 
*    race_th_df_d cand_th_df_d attrace_d conservatism_d symb_racism_d 
*    amp_filter$ combined_filter$ . 

*filter definitions: .
COMPUTE IAT_filter$ = (ntrials=96) & (pct_300<10) & (pct_2K<20) & (error_pct<35) & (aveltncy<1700) .
*COMPUTE amp_filter$ = (race_amp_d >= -2.97 AND race_amp_d <= 3.07) .
*COMPUTE amp_filter$ = (race_amp_d >= -3.97 AND race_amp_d <= 4.07) .
COMPUTE amp_filter$ = (race_amp_d >= -4.97 AND race_amp_d <= 5.07) .
COMPUTE combined_filter$ = (amp_filter$=1 AND iat_filter$=1) .
FREQUENCIES IAT_filter$ amp_filter$ combined_filter$ .

*Compute average of two self-report measures.
*COMPUTE exp_race_d = MEAN(race_th_df_d, attrace_d) .
*COMPUTE imp_race_d = MEAN(race_IATall_d, race_amp_d) .
*EXECUTE .


*Analyses limited to those with data on all measures to be reported in article (including Black Ss) .

COMPUTE prelim_filter$ = (VoteMcCain ge 0) & (citizen=1 & age ge 18) 
       & (race_th_df_d > -10 & attrace_d > -10 & symb_racism_d > -10 & conservatism_d > -10) .  
FREQUENCIES prelim_filter$ .
FILTER BY prelim_filter$ .
FREQUENCIES IAT_filter$ amp_filter$ combined_filter$ .

FREQUENCIES ntrials .
*27 have fewer than 96; 1 has 138 .
SELECT IF (ntrials=96) .
FREQUENCIES amp_filter$ .
CROSSTABS amp_filter$ BY IAT_filter$ .

SELECT IF amp_filter$ = 1 .
COMPUTE pct_300_ok = (pct_300<10) .
COMPUTE pct_2k_ok = (pct_2K<20) .
COMPUTE error_pct_ok = (error_pct<35) .
COMPUTE aveltncy_ok = (aveltncy<1700) .
EXECUTE .

FREQUENCIES pct_300_ok pct_2k_ok error_pct_ok aveltncy_ok IAT_filter$ amp_filter$ combined_filter$ . 
CROSSTABS pct_2k_ok BY aveltncy_ok .
CROSSTABS pct_300_ok BY error_pct_ok .
CROSSTABS aveltncy_ok BY error_pct_ok .
CROSSTABS aveltncy_ok BY pct_300_ok .



COMPUTE filter$ = (combined_filter$=1) .
FILTER BY filter$ .

*Compute weights to be used in analyses.
*Weight inversely proportional to distribution (15.8% McCain; 84.2% Obama) .  
IF (VoteMcCain = 1) weight = 1/.158 .
IF (VoteMcCain = 0) weight = 1/.842 .

*Predicting symbolic racism from implicit race attitude measures.
REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_IATall_d / ENTER race_amp_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_IATall_d / ENTER race_amp_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_amp_d / ENTER race_IATall_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_amp_d / ENTER race_IATall_d .


*Assess contributions of explicit vs. implicit race attitude to symbolic racism.
REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_IATall_d race_amp_d / ENTER race_th_df_d attrace_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_IATall_d race_amp_d / ENTER race_th_df_d attrace_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER attrace_d race_th_df_d / ENTER race_IATall_d race_amp_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER attrace_d race_th_df_d / ENTER race_IATall_d race_amp_d .


*Predicting conservatism from race attitude measures.
REGRESSION / STAT = R CHA COEFF ZPP  / DEP = conservatism_d
 / ENTER race_IATall_d race_amp_d / ENTER race_th_df_d attrace_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP ANOVA / DEP = conservatism_d
 / ENTER race_IATall_d race_amp_d / ENTER race_th_df_d attrace_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = conservatism_d
 / ENTER race_th_df_d attrace_d / ENTER race_IATall_d race_amp_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = conservatism_d
 / ENTER race_th_df_d attrace_d / ENTER race_IATall_d race_amp_d .


*Assess contributions of race attitudes vs. conservatism to symbolic racism.
REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_IATall_d race_amp_d race_th_df_d attrace_d / ENTER conservatism_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_IATall_d race_amp_d race_th_df_d attrace_d / ENTER conservatism_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER conservatism / ENTER race_IATall_d race_amp_d race_th_df_d attrace_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER conservatism / ENTER race_IATall_d race_amp_d race_th_df_d attrace_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER conservatism / ENTER race_IATall_d race_amp_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER conservatism / ENTER race_IATall_d race_amp_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER conservatism / ENTER race_th_df_d attrace_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER conservatism / ENTER race_th_df_d attrace_d .


*Assess contributions of implicit vs. explicit race attitude to vote .
REGRESSION / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER race_IATall_d race_amp_d / ENTER race_th_df_d attrace_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER race_IATall_d race_amp_d / ENTER race_th_df_d attrace_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER attrace_d race_th_df_d / ENTER race_IATall_d race_amp_d .

REGRESSION / REGWGT = weight / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER attrace_d race_th_df_d / ENTER race_IATall_d race_amp_d .

CORRELATIONS VoteMcCain race_IATall_d race_amp_d race_th_df_d attrace_d symb_racism_d conservatism_d .
MEANS VoteMcCain D_biep_all amp race_th_dif attrace conservatism symb_racism .


REGRESSION / DESCRIPTIVES / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER race_IATall_d race_amp_d race_th_df_d attrace_d symb_racism_d conservatism_d .

REGRESSION / REGWGT = weight / DESCRIPTIVES  / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER race_IATall_d race_amp_d race_th_df_d attrace_d symb_racism_d conservatism_d .

*Data for Table 1.

REGRESSION / DESCRIPTIVES / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER D_biep_all amp race_th_dif attrace symb_racism conservatism .

REGRESSION / REGWGT = weight / DESCRIPTIVES  / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER D_biep_all amp race_th_dif attrace symb_racism conservatism .



*Logistic regressions .
LOGISTIC REGRESSION VoteMcCain 
 / ENTER race_IATall_d race_AMP_d race_th_df_d attrace_d .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER race_IATall_d race_AMP_d 
 / ENTER race_th_df_d attrace_d .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER race_th_df_d attrace_d 
 / ENTER race_IATall_d race_AMP_d .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER race_th_df_d attrace_d 
 / ENTER race_IATall_d .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER race_th_df_d attrace_d 
 / ENTER race_AMP_d .



LOGISTIC REGRESSION VoteMcCain 
 / ENTER conservatism_d 
 / ENTER race_IATall_d race_AMP_d race_th_df_d attrace_d .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER conservatism_d 
 / ENTER race_IATall_d race_AMP_d  .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER conservatism_d 
 / ENTER attrace_d race_th_df_d  .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER symb_racism_d 
 / ENTER race_IATall_d race_AMP_d race_th_df_d attrace_d .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER symb_racism_d 
 / ENTER race_IATall_d race_AMP_d .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER symb_racism_d 
 / ENTER attrace_d race_th_df_d .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER conservatism_d 
 / ENTER symb_racism_d 
 / ENTER race_IATall_d race_AMP_d race_th_df_d attrace_d .

LOGISTIC REGRESSION VoteMcCain 
 / ENTER conservatism_d 
 / ENTER symb_racism_d 
 / ENTER race_IATall_d .

FREQUENCIES filter$ .
SELECT IF filter$ = 1 .
EXECUTE .

CORRELATIONS qtryhard qpushfast qdeserve qslavery symb_racism .

RELIABILITY VARIABLES = qtryhard qpushfast qdeserve qslavery 
 / SCALE (OVERALL) = ALL
 / MODEL = ALPHA
 / SUMMARY = MEANS TOTAL .

COMPUTE sym_rac = SUM(qtryhard, qpushfast, qdeserve, qslavery) .
CORRELATIONS sym_rac symb_racism .

SAVE TRANSLATE OUTFILE= "AMP_IAT_voters_only(really).sas7bdat"
  /TYPE=SAS /VERSION=7 /PLATFORM=WINDOWS /MAP /REPLACE .


************************************************************************* .
* Repeat the above excluding Black respondents .
*Analyses limited to those with data on all measures to be reported in article .
COMPUTE filter$ = (VoteMcCain ge 0) & (combined_filter$=1 & black=0 & citizen=1 & age ge 18) 
       & (race_th_df_d > -10 & attrace_d > -10 & symb_racism_d > -10 & conservatism_d > -10) .  
FREQUENCIES filter$ .
FILTER BY filter$ .

*Assess contributions of IAT vs AMP to symbolic racism .
REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_IATall_d / ENTER race_amp_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_amp_d / ENTER race_IATall_d .

*Assess contributions of explicit vs. implicit race attitude to symbolic racism.
REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_IATall_d race_amp_d / ENTER race_th_df_d attrace_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER attrace_d race_th_df_d / ENTER race_IATall_d race_amp_d .

*Assess contributions of race attitudes vs. conservatism to symbolic racism.
REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER race_IATall_d race_amp_d race_th_df_d attrace_d / ENTER conservatism_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = symb_racism_d
 / ENTER conservatism / ENTER race_IATall_d race_amp_d race_th_df_d attrace_d .

*Assess contributions of implicit vs. explicit race attitude to vote .
REGRESSION / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER race_IATall_d race_amp_d / ENTER race_th_df_d attrace_d / ENTER conservatism_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER attrace_d race_th_df_d / ENTER race_IATall_d race_amp_d / ENTER conservatism_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER conservatism_d / ENTER attrace_d race_th_df_d race_IATall_d race_amp_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER conservatism_d / ENTER attrace_d race_th_df_d / ENTER race_IATall_d race_amp_d .

REGRESSION / STAT = R CHA COEFF ZPP / DEP = VoteMcCain
 / ENTER conservatism_d / ENTER race_IATall_d race_amp_d / ENTER attrace_d race_th_df_d .


CORRELATIONS VoteMcCain race_IATall_d race_amp_d race_th_df_d attrace_d symb_racism_d conservatism_d .
MEANS VoteMcCain D_biep_all amp race_th_dif attrace conservatism symb_racism .
